package com.example.mybatisdemo.service;

import com.example.mybatisdemo.mapper.UserMapper;
import com.example.mybatisdemo.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserSeverice {
    @Autowired
    private UserMapper mapper;

    public List<UserInfo> getListAll(){
        return mapper.getList();
    }

    public UserInfo queryByNameAndPassword(String username, String password) {
        return mapper.queryByNameAndPassword(username,password);
    }
}
